-- GENERATED SPELL FOR [Witherbark Witch Doctor] --


function spell0_2555(pUnit, Event) --@Healing Ward,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(5605,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_2555', 1, 1)
end

function spell1_2555(pUnit, Event) --@Magma Totem,Self--
pUnit:FullCastSpellOnTarget(8190,pUnit)
pUnit:RegisterEvent('Sorts_2555', 21279, 1)
end

function Sorts_2555(pUnit, Event)
local choix_sorts_2555 = math.random(0, 1)
if choix_sorts_2555 == 0 then
pUnit:RegisterEvent('spell0_2555', 1, 1)
end
if choix_sorts_2555 == 1 then
pUnit:RegisterEvent('spell1_2555', 1, 1)
end
end

function mob2555_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2555', math.random(1500, 3000), 1)
end

function mob2555_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2555_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2555_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2555, 1, 'mob2555_Action')
RegisterUnitEvent(2555, 2, 'mob2555_Leave')
RegisterUnitEvent(2555, 3, 'mob2555_Kill')
RegisterUnitEvent(2555, 4, 'mob2555_Die')
